package com.szcinda.service.dto.client;

import com.szcinda.repository.BaoGuanFee;
import com.szcinda.repository.CalculateType;
import lombok.Data;

import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

@Data
public class ClientDetailDto implements Serializable {
    private String id;
    private String code;
    private String name;
    private String fullName;
    private String licence;
    private int settlementDays;
    private String organizationId;

    private ContractDto contract;

    private List<ExchangeRateDto> rates;
    private List<LinePrice> linePrices;
    private List<FeeDto> fees;

    private BaoGuanFee baoGuanFee;

    private List<ClientVehiclePriceDto> vehiclePrices;

    @Data
    public static class FeeDto implements Serializable {
        private String feeName;
        private double feeCount;
        private String currency;
    }

    @Data
    public static class ContractDto implements Serializable{
        private String contractNumber;
        private String contractName;
        private LocalDate signedDate;
        private LocalDate expiresDate;
        private LocalDate remindDate;
    }

    @Data
    public static class LinePrice implements Serializable{
        private String id;
        private String businessType;
        private String unit;
        private String originPlace;
        private String destPlace;
        private String departurePort;
        private String feeName;
        private String feeType;
        private String currency;
        private double price;
        private CalculateType calculateType;
        private LocalDate startDate;
        private LocalDate endDate;
    }

    @Data
    public static class ExchangeRateDto implements Serializable{
        private String id;
        private String fromRate;
        private String toRate;
        private double rate;
    }
}
